package com.itheima;

import com.itheima.config.SpringConfig;
import com.itheima.pojo.Account;
import com.itheima.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {
        //ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
        ApplicationContext app = new AnnotationConfigApplicationContext(SpringConfig.class);

        AccountService accountService = app.getBean(AccountService.class);
        Account account = accountService.getById(1);
        System.out.println(account);
    }
}
